<template>
    <cluedetail
        ref="casedetail"
         @tabclick="tabclick"
        :hideBtn="true"
    >
        <form-btns ref="btns" slot="btns" @close="cancle"/>
<!--        <casestart-info slot="casestart"-->
<!--                v-model="cluedetailVisible"-->
<!--                ref="transferFrom"-->
<!--                @submit="closetransferFrom"-->
<!--        />-->
    </cluedetail>
</template>
<script>
    import {mapActions, mapGetters, mapState} from "vuex";
    // import caseclueApi from "@/api/system/caseclue";
    import deptApi from "@/api/system/dept";
    import FormBtns from "@/views/comps/zhzf/form-btns";
    import cluedetail from "@/views/evidence/detail/casedetail";
    import beforeendInfo from "@/views/evidence/detail/beforeend";
    import cluetransferInfo from "@/views/evidence/detail/cluetransfer";
    import casestartInfo from "@/views/evidence/detail/casestart";
    import utils from "@/assets/utils/zhzf-util";
    export default {
        components: {
            cluedetail,
            FormBtns,
            casestartInfo
        },
        data() {
            return {
                detail: {
                    newTabItem: '',
                },
                tabindex: '',
                datalist:[]
            };
        },
        mounted() {
            let detail = this.$route.params.row;
            this.initPage(detail);
        },
        methods: {
            ...mapActions("d2admin/page", ["close"]),
            cancle() {
                this.close({tagName: "/evidence/deal/detail"});
            },
            closedetail(){
                this.cancle()
            },
            closetransferFrom(){
                this.cancle()
            },
            async _fetchData(param) {
                param = Object.assign({ type: 1 }, param || {});
                let res = await deptApi.deptPage(param);
                this.datalist = res.data;
            },
            async initPage(detail) {
                this.$refs.casedetail.initPage(detail);
                this.detail = detail;
                this._fetchData();
                this.$refs.btns.setBtns([
                    {url: 'close', name: '取消', icon: 'fa fa-close', type: 'danger'},
            ])
            },
            tabclick(tab) {
                this.tabindex = tab.index;
            }
        }
    };
</script>
<style lang="scss">
    .case-detail {
        background: #fff;
        padding-bottom: 20px;
        border: 1px solid #ccc;

        .el-form {
            .el-form-item__label {
                width: 120px !important;
            }

            .el-form-item__content {
                margin-left: 120px !important;
            }

            .el-date-editor.el-input {
                width: 100% !important;
            }
        }
    }
</style>
